package com.ruoyi.web.controller.system;

import java.util.List;
import javax.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.domain.SysKeyNz;
import com.ruoyi.system.service.ISysKeyNzService;
import com.ruoyi.common.core.page.TableDataInfo;

/**
 * 【请填写功能名称】Controller
 * 
 * @author ruoyi
 * @date 2024-09-13
 */
@RestController
@RequestMapping(value = "/nz")
public class SysKeyNzController extends BaseController
{
    @Resource
    private ISysKeyNzService sysKeyNzService;

    /**
     * 查询【请填写功能名称】列表
     */
    @GetMapping("/list")
    public TableDataInfo list(SysKeyNz sysKeyNz)
    {
        startPage();
        List<SysKeyNz> list = sysKeyNzService.selectSysKeyNzList(sysKeyNz);
        return getDataTable(list);
    }


    /**
     * @Deprecated 新增自己的卡密
     */
    @PostMapping(value = "/addKey")
    private AjaxResult addKey(@RequestBody SysKeyNz sysKeyNz) {
        return sysKeyNzService.addKey(sysKeyNz);
    }


    /**
     * @Deprecated 删除自己的卡密
     */
    @PostMapping(value = "/delKey")
    private AjaxResult delKey(@RequestBody SysKeyNz sysKey) {
        return sysKeyNzService.delKey(sysKey);
    }

    /**
     * @Deprecated 封停卡密
     */
    @PostMapping("/shutDown")
    private AjaxResult shutDown(String key) {
        return sysKeyNzService.shutDown(key);
    }

    /**
     * @Deprecated 解绑卡密
     */
    @PostMapping("/noBind")
    private AjaxResult noBind(String key) {
        return sysKeyNzService.noBind(key);
    }

}
